package ch.fhnw.qualiscan.api.output;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

import ch.fhnw.qualiscan.core.db.pojos.Language;

@XmlType(propOrder = {"title", "desc"})
public class LanguageOutput {
	
	String title;
	String desc;
	Language language;
	
	public LanguageOutput() {}
	
	public LanguageOutput(String title, String desc, Language language) {
		this.title = title;
		this.desc = desc;
		this.language = language;
	}
	
	@XmlElement
	public String getTitle() {
		return this.title;
	}
	
	@XmlElement
	public String getDesc() {
		return this.desc;
	}
	
	@XmlAttribute
	public String getLanguage() {
		return this.language.getLocale();
	}
	
}
